package com.uidt.project.ptsj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uidt.project.ptsj.mapper.PtsjFileMapper;
import com.uidt.project.ptsj.domain.PtsjFile;
import com.uidt.project.ptsj.service.IPtsjFileService;

/**
 * 附件Service业务层处理
 * 
 * @author uidt
 * @date 2024-08-28
 */
@Service
public class PtsjFileServiceImpl implements IPtsjFileService 
{
    @Autowired
    private PtsjFileMapper ptsjFileMapper;

    /**
     * 查询附件
     * 
     * @param id 附件主键
     * @return 附件
     */
    @Override
    public PtsjFile selectPtsjFileById(Long id)
    {
        return ptsjFileMapper.selectPtsjFileById(id);
    }

    /**
     * 查询附件列表
     * 
     * @param ptsjFile 附件
     * @return 附件
     */
    @Override
    public List<PtsjFile> selectPtsjFileList(PtsjFile ptsjFile)
    {
        return ptsjFileMapper.selectPtsjFileList(ptsjFile);
    }

    /**
     * 查询附件列表
     *
     * @param glids 附件
     * @return 附件集合
     */
    public List<PtsjFile> selectPtsjFileListByGlid(List<String> glids, String tableName){

        return ptsjFileMapper.selectPtsjFileListByGlid(glids,tableName);
    }

    /**
     * 新增附件
     * 
     * @param ptsjFile 附件
     * @return 结果
     */
    @Override
    public int insertPtsjFile(PtsjFile ptsjFile)
    {
        return ptsjFileMapper.insertPtsjFile(ptsjFile);
    }

    /**
     * 修改附件
     * 
     * @param ptsjFile 附件
     * @return 结果
     */
    @Override
    public int updatePtsjFile(PtsjFile ptsjFile)
    {
        return ptsjFileMapper.updatePtsjFile(ptsjFile);
    }

    /**
     * 批量删除附件
     * 
     * @param ids 需要删除的附件主键
     * @return 结果
     */
    @Override
    public int deletePtsjFileByIds(Long[] ids)
    {
        return ptsjFileMapper.deletePtsjFileByIds(ids);
    }

    /**
     * 删除附件信息
     * 
     * @param id 附件主键
     * @return 结果
     */
    @Override
    public int deletePtsjFileById(Long id)
    {
        return ptsjFileMapper.deletePtsjFileById(id);
    }
}
